<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Toolbar.aspx.cs" Inherits="Manager_Toolbar" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%">
<head id="Head1" runat="server" style="height: 100%">
    <title>Administrator</title>
    <link href="../Pub/Css/BodyStyles.css" rel="stylesheet" type="text/css" />
    <link href="../Pub/Css/AdminStyles.css" rel="stylesheet" type="text/css" />
    <link href="../Pub/Css/CalendarStyles.css" rel="stylesheet" type="text/css" />
</head>
<body style="height: 100%">
    <form id="form1" runat="server" style="height: 100%">
        <div style="height: 100%">
            <table id="tblBodyMain" border="0" cellpadding="0" cellspacing="0" style="height: 100%">
                <tr style="height: 100%">
                    <td style="height: 100%" id="tdFix">
                        <table border="0" cellpadding="0" cellspacing="0" style="height: 100%">
                            <tr style="height: 100%">
                                <td>
                                    &nbsp;</td>
                                <td style="background-image: url('../Images/Icon/cs.jpg'); background-repeat: repeat-y;
                                    background-color: white; background-position: center; width: 7px; text-align: center;
                                    height: 100%" align="right">
                                    <img border="0" onclick="fnOnFix(this)" src="../Images/Icon/fixup.gif" style="cursor: pointer;
                                        top: 10px; position: absolute;" />
                                    <img src="../Images/Icon/arrow_left.gif" border="0" onclick="fnShowMainLeft(this)"
                                        id="imgArrow" style="cursor: pointer;" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <input type="hidden" id="hidleft" value="1" />
        <input id="hidFix" runat="server" type="hidden" value="0" />
    </form>

    <script language="javascript" type="text/javascript">
    function fnShowMainLeft(obj)
    {
        var hidleft=document.getElementById("hidleft");
        var tdMainLeft=parent.document.getElementById("fParent");   
   
    
        if(hidleft.value=="1")
        {
            hidleft.value="0";

            tdMainLeft.cols="0%,15px,*";
            obj.src="../Images/Icon/arrow_right.gif";       
                 
        }
        else
        {
             hidleft.value="1";
             tdMainLeft.cols="20%,15px,*";             
             obj.src="../Images/Icon/arrow_left.gif";
        }
    }
    
    function fnOnFix(obj)
    {
        var hidFix=document.getElementById("<%=hidFix.ClientID %>");
        var tdFix=document.getElementById("tdFix"); 
         //var tdMainLeft=top.parent.fParent.document.getElementById("Medium");   
         //var tdMainLeft=top.parent.document.all["fParent"].document.getElementById("Medium").document.getElementById("tblMainMenu");//.document.all.Medium;
         var tdMainLeft=top.parent.document.frames["fParent"].document.getElementById("Medium").contentWindow.document.getElementById("tblMainMenu");
        // alert(tdMainLeft.outerHTML);
        /* return;*/
        var imgArrow=document.getElementById("imgArrow");          
           
        if(hidFix.value=="0")
        {
            hidFix.value="1";           
            obj.src="../Images/Icon/nofixup.gif"; 
            tdFix.setAttribute("onmouseover","fnAutoMainLeft('1')")   ;  
            tdFix.setAttribute("onmouseout","fnAutoMainLeft('0')")   ;   
            tdMainLeft.setAttribute("onmouseover","fnAutoMainLeft('1')")   ;         
            tdMainLeft.setAttribute("onmouseout","fnAutoMainLeft('0')")   ;    
        }
        else
        {
            hidFix.value="0";           
            obj.src="../Images/Icon/fixup.gif";
            tdFix.removeAttribute("onmouseover");            
            tdFix.removeAttribute("onmouseout");
            tdMainLeft.removeAttribute("onmouseover");  
            tdMainLeft.removeAttribute("onmouseout"); 
        }        
    }
    
    function fnAutoMainLeft(flag)
    {
        var hidleft=document.getElementById("hidleft");
        var tdMainLeft=parent.document.getElementById("fParent");   
        var obj=document.getElementById("imgArrow");

        if(flag=="0")
        {
            hidleft.value="0";
           
             tdMainLeft.cols="0%,15px,*";
            obj.src="../Images/Icon/arrow_right.gif"; 
        }
        else
        {
             hidleft.value="1";
             tdMainLeft.cols="20%,15px,*";
             obj.src="../Images/Icon/arrow_left.gif";  
             
             //var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
             // document.body.scrollTop=parseInt(st);
             //document.documentElement.scrollTop=parseInt(st);
        }
    }
    </script>

</body>
</html>
